<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
       var arr=[1,2,3,4,5,6,7,8];
       Array.prototype.myEvery=function(handler){
          var flag=true;
          for (var i=0;i<this.length;i++){
              var item=this[i];
              var result=handler(item);
              if(result){
                  continue
              }
              else{
                  flag=false;
                  break
              }
          }
          return flag;
       }
       var result=arr.myEvery(function(item){
           return item>2;
       })
		console.log(result)

    </script>
</head>
<body>
    
</body>
</html>